from duck import Duck
from turkey import Turkey
import random

class Turkey2Duck(Duck):
    def __init__(self, turkey: Turkey):
        self._turkey = turkey

    def quack(self):
        self._turkey.gobble()

    def fly(self):
        for i in range(5):
            self._turkey.fly()


class Duck2Turkey(Turkey):
    def __init__(self, duck: Duck):
        self._duck = duck

    def gobble(self):
        self._duck.quack()

    def fly(self):
        if random.randint(0,4) == 0:
            self._duck.fly()
